<?php
include "../config/koneksi.php";
include "../class/kategori.php";
$kategori_dao=new Kategori_Dao();
$list=$kategori_dao->get_all();
?>
<html>
<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<script src="bootstrap/js/bootstrap.js"></script>
<body>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="30""> 
      <div align="left"><font size="3" face="tahoma">Manajemen Kategori</font><br></font><hr color=#CCCCFF>
      <a href=index.php?menu=tambah_kategori>
<input type=submit value="Tambah Kategori"></a></div></td>
    </tr>
  </table>
  <div align=center>
	<table class="table table-bordered">

<div align=center>
<table border=1 cellpadding=0 cellspacing=0 style=border-collapse: collapse width=100% id=AutoNumber1>
		<tr>
			<td width=3% bgcolor=#999999>
			<font face=Tahoma color=#FFFFFF size=2>No.</font></td>
			<td width=27% bgcolor=#999999 align=center>
			<font face=Tahoma color=#FFFFFF size=2>Nama Kategori</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium colspan=3 width=15%>
			<font face=Tahoma color=#FFFFFF size=2>Aksi</font></td>
		</tr>
	<?php
	$i=1;
	foreach($list as $list2){
	$id_kategori=$list2->id_kategori;
	?>
	<tr>
		<td width=3% style=border-style: none; border-width: medium align=center valign=top><font face=Tahoma size=2><?php echo $i;?></font></td>
		<td style=border-style: none; border-width: medium width=27% align=left valign=top><font face=Tahoma size=2><?php echo $list2->kategori; ?></font></td>
		<td><?php echo "<a href=index.php?menu=edit_kategori&id_kategori=$id_kategori title='Edit Kategori'><img border=0 src=../images/edit.png></a>";?></td>
		<td><?php echo "<a href=index.php?menu=hapus_kategori&id_kategori=$id_kategori title='Hapus Kategori'><img border=0 src=../images/delete.png></a>";?> </td>
	</tr>
	<?php $i++;}?>
	</table>
</body>
</html>